"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("../index");
let app = new index_1.Finch({});
app.StaticDir = "./files";
app.use('/', (req, res, next) => {
    res.writeHead(200, { 'content-type': 'text/plain' });
    res.write('HELLO WORLD!');
    res.end();
});
app.use('/responseJson', (req, res, next) => {
    index_1.responseWare.rJson(res, { "Hello": "World" });
});
app.use('/upload', index_1.postParser);
app.use('/upload', (req, res) => {
    let fieldStr = JSON.stringify(req.postFields);
    let fileStr = JSON.stringify(req.postFiles);
    app.Logger.log(fieldStr + "\r\n" + fileStr);
    res.writeHead(200, { 'content-type': 'text/plain' });
    res.write('received upload:\n\n');
    res.end();
});
app.listen(3000);
